﻿// Data/ReportDbContext.cs
using FuturesReportViewer.Models;
using Microsoft.EntityFrameworkCore;

namespace FuturesReportViewer.Data
{
    public class ReportDbContext : DbContext
    {
        public ReportDbContext(DbContextOptions<ReportDbContext> options) : base(options)
        {
        }

        public DbSet<ReportContent> Reports { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            // 如果不使用 [PrimaryKey] 特性，可以在这里配置复合主键
            // modelBuilder.Entity<ReportContent>().HasKey(rc => new { rc.Date, rc.Pzdm });
        }
    }
}